package product;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.text.SimpleDateFormat;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.Vector;

import javax.swing.JInternalFrame;
import javax.swing.JOptionPane;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.SwingConstants;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableColumn;
import javax.swing.table.TableColumnModel;
import javax.swing.JComboBox;
import javax.swing.JTextField;
import javax.swing.JButton;

import java.awt.Color;
import java.awt.Component;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.event.ItemListener;
import java.awt.event.ItemEvent;

import javax.swing.JCheckBox;
import javax.swing.JLayeredPane;
import javax.swing.border.TitledBorder;
import javax.swing.UIManager;
import javax.swing.JSplitPane;
import javax.swing.JSeparator;

public class MemberMonth extends JInternalFrame {

	

	Connection conn;
	ProductMain3 pm;
	
	DefaultTableModel model;
	TableColumn column = null; // 컬럼 넓이 조정하기 위해서.
	
	int mchultotal = 0;; // 개인 조회시 일별 컬럼.
	int mtotal = 0;
	
	String test = ""; // (개인별, 부서별 조회시) 사원번호가 있는지 없는지 확인.
	
	// 컬럼 세팅
	String mchulirum; // 테이블에 뿌리기 위한 이름 저장.
	String mcode;     // 사번 저장.
	Vector<String> col; // 사번, 이름, 일 컬럼 저장.
	Vector alldata = new Vector<>(); // 부서 조회시 월별 출퇴근 현황 저장.
	
	boolean flag = true; // 부서조회.
	boolean tflag = true;
	int cnt=1; // 월별 일 카운트.
	
	int cnt2=0; // 출근 카운트.
	int cnt3=0; // 결근 카운트.
	int cnt4=0; // 휴가 카운트.
	
	// 콤보 박스 설정.
	Vector coyear = new Vector<>();
	Vector comon = new Vector<>();
	Vector<String> comteam = new Vector<String>();
	Vector<String> composi = new Vector<String>();
	
	String comboMon = "";
	String comboYear = "";
	
	String comboposition= "";
	String comboteam = "";

	int m = 1;
	int n = 1;

	private JScrollPane scrollPane;
	private JTable table;
	private JComboBox comboBox;
	private JComboBox comboBox_1;
	private JTextField finds;
	private JButton btnNewButton;
	private JLayeredPane layeredPane;
	private JLayeredPane layeredPane_1;
	private JComboBox comboBox_3;
	private JCheckBox CheckBox;
	private JButton btnAll;

	/**
	 * Launch the application.
	 */

	// public static void main(String[] args) {
	// EventQueue.invokeLater(new Runnable() {
	// public void run() {
	// try {
	// MemberMonth frame = new MemberMonth();
	// frame.setVisible(true);
	// } catch (Exception e) {
	// e.printStackTrace();
	// }
	// }
	// });
	// }

	/**
	 * Create the frame.
	 */
	public MemberMonth(ProductMain3 pm, Connection conn) {
		super("월별 조회", false, true, true, true);
		this.pm = pm;
		this.conn = conn;

		setBounds(0, 0, 1320, 370);
		getContentPane().setLayout(null);
		getContentPane().add(getScrollPane());
		getContentPane().add(getFinds());
		getContentPane().add(getBtnNewButton());
		getContentPane().add(getLayeredPane_1());
		getContentPane().add(getLayeredPane_1_1());
		getContentPane().add(getBtnAll());
	}
	
	private JScrollPane getScrollPane() {
		if (scrollPane == null) {
			scrollPane = new JScrollPane();
			scrollPane.setBounds(12, 77, 1279, 254);
			scrollPane.setViewportView(getTable());
		}
		return scrollPane;
	}

	private JTable getTable() {
		if (table == null) {
			model = new DefaultTableModel(col, 0){
				public boolean isCellEditable(int rowIndex, int mColIndex) {
					return false;
				}
			};
			table = new JTable(model);
			table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
			
		}
		return table;
	}

	private JComboBox getComboBox() {
		if (comboBox == null) {
			comboBox = new JComboBox(coyear);
			comboBox.setBounds(12, 26, 71, 21);
			comboBox.addItemListener(new ItemListener() {
				public void itemStateChanged(ItemEvent e) {
					if (e.getStateChange() == e.SELECTED) {
						comboYear = String.valueOf(e.getItem());
					}
				}
			});
			try {
				String comyear = "select distinct to_char(chuldate, 'yyyy') from chuldata "
						+ "order by to_char(chuldate, 'yyyy')";
				PreparedStatement ps = pm.conn.prepareStatement(comyear);
				ResultSet rsyear = ps.executeQuery();
				
				while (rsyear.next()) {
					coyear.add(rsyear.getString(1));
					m++;
				}
				ps.close();
				rsyear.close();
				m = 1;
				
				SimpleDateFormat sd = new SimpleDateFormat("yyyy");
				String dYear = (String)sd.format(new Date());
				comboBox.setSelectedItem(dYear);
				
			}catch(Exception ex){
				ex.printStackTrace();
			}
		}
		return comboBox;
	}

	private JComboBox getComboBox_1_1() {
		if (comboBox_1 == null) {
			comboBox_1 = new JComboBox(comon);
			comboBox_1.setBounds(95, 26, 58, 21);
			comboBox_1.addItemListener(new ItemListener() {
				public void itemStateChanged(ItemEvent e) {
					if (e.getStateChange() == e.SELECTED) {
						comboMon = String.valueOf(e.getItem());
					}
				}
			});
			try {
				String common = "select distinct to_char(chuldate, 'MM') from chuldata "
						+ "order by to_char(chuldate, 'MM')";
				PreparedStatement ps2 = pm.conn.prepareStatement(common);
				ResultSet rsmon = ps2.executeQuery();
				while (rsmon.next()) {
					comon.add(rsmon.getString(1));
					n++;
				}
				n = 1;
				ps2.close();
				rsmon.close();
				
				SimpleDateFormat sm = new SimpleDateFormat("MM");
				String dMon = (String)sm.format(new Date());
				comboBox_1.setSelectedItem(dMon);
				
				
			} catch (Exception ex) {
				ex.printStackTrace();
			}
		}
		return comboBox_1;
	}

	private JTextField getFinds() {
		if (finds == null) {
			finds = new JTextField();
			finds.setBounds(336, 39, 178, 21);
			finds.setColumns(10);
		}
		return finds;
	}

	private JButton getBtnNewButton() {
		if (btnNewButton == null) {
			btnNewButton = new JButton("조회");
			btnNewButton.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent e) {
					cal();
				}
			});
			btnNewButton.setBounds(526, 39, 81, 21);
		}
		return btnNewButton;
	}

	public void cal() {

		try {
			if(CheckBox.isSelected()==false){
				if (!finds.getText().trim().equals("") && !(comboYear.equals(""))
						&& !(comboMon.equals(""))) {
					String fi = finds.getText();

					// 사원코드가 있는지 없는 지 확인.
					String testsql = "select memberid from chuldata where memberid=?";
					PreparedStatement testpstmt = pm.conn.prepareStatement(testsql);
					testpstmt.setString(1, fi);
					ResultSet testrs = testpstmt.executeQuery();
					while (testrs.next()) {
						test = testrs.getString(1);
					}

					if (!test.trim().equals("")) {
						model.setNumRows(0);
						// 월별 날짜 컬럼을 만들기 위해서 마지막날 뽑기
						String sql = "select to_char(last_day(?), 'DD') from dual";
						PreparedStatement pstmt = pm.conn.prepareStatement(sql);
						pstmt.setString(1, comboYear + "-" + comboMon + "-" + "1");
						ResultSet rs = pstmt.executeQuery();
						
						// 사원코드에 맞는 이름을 불러오기 위함.
						String sql2 = "select distinct c.memberid, m.irum from chuldata c inner join memberdata m "
								+ "on c.memberid=m.memberid where c.memberid=?";
						PreparedStatement pstmt2 = pm.conn.prepareStatement(sql2);
						pstmt2.setString(1, fi);
						ResultSet rs2 = pstmt2.executeQuery();

						// 컬럼명 테이블에 세팅
						while (rs.next()) {
							mchultotal = rs.getInt(1);
						}
						while (rs2.next()) {
							mchulirum = rs2.getString(1);
							mcode     = rs2.getString(2);
						}

						col = new Vector<>();
						col.add("사번");
						col.add("이름");
						col.add("");
						col.add("");
						col.add("");
						for (int j = 1; j <= mchultotal+3; j++) {
							if(j==(mchultotal+1)){
								col.set(2, "출근");
							}
							else if(j==(mchultotal+2)){
								col.set(3, "결근");
							}
							else if(j==(mchultotal+3)){
								col.set(4, "휴가");
							}
							else{
								col.add(j + "일");
							}
						}
						model = new DefaultTableModel(col, 0){
							public boolean isCellEditable(int rowIndex, int mColIndex) {
								return false;
							}
						};
						table.setModel(model);
						
						DefaultTableCellRenderer dtcr = new DefaultTableCellRenderer(); // 디폴트테이블셀렌더러를 생성
						dtcr.setHorizontalAlignment(SwingConstants.CENTER); // 렌더러의 가로정렬을 CENTER로
						
						TableColumnModel tcm = table.getColumnModel(); // 정렬할 테이블의 컬럼모델을 가져옴

						for (int j = 0; j <= mchultotal+4; j++) {
							column = table.getColumnModel().getColumn(j);
							column.setResizable(false);
							tcm.getColumn(j).setCellRenderer(dtcr);
							if (j == 0) {
								column.setPreferredWidth(45);
							}else if(j == 1){
								column.setPreferredWidth(50);
							}else {
								column.setPreferredWidth(34);
							}
						}
						
						// 사원코드에 맞는 출퇴근 현황을 불러옴.
						String sql3 = "select chultype from chuldata "
								+ "where memberid=? and to_char(chuldate, 'yyyy-MM')=?";
						PreparedStatement pstmt3 = pm.conn.prepareStatement(sql3);
						pstmt3.setString(1, fi);
						pstmt3.setString(2, comboYear + "-" + comboMon);
						ResultSet rs3 = pstmt3.executeQuery();
						
						// 휴가
						String sql4 = "select distinct h.holytype, to_char(h.holydate, 'dd') "
								+ "from holydata h inner join chuldata c "
								+ "on h.memberid=c.memberid where c.memberid=? and c.chultype='1' "
								+ "and to_char(h.holydate, 'yyyy-MM')=?";
						PreparedStatement pstmt4 = pm.conn.prepareStatement(sql3);
						pstmt4.setString(1, fi);
						pstmt4.setString(2, comboYear + "-" + comboMon);
						ResultSet rs4 = pstmt4.executeQuery();
												
						// 테이블에 월별 출퇴근 현황 출력
						Vector d = new Vector<>();
						d.add(mchulirum);
						d.add(mcode);
						d.add("");
						d.add("");
						d.add("");
						while (rs3.next()) {							
							int r = rs3.getInt(1);
							if (r == 1) {
								d.add(" O");
								cnt2++;
							} else if (r == 0) {
								d.add(" X");
								cnt3++;
							} else {
								cnt4++;
							}
						}
						d.set(2, cnt2);
						d.set(3, cnt3);
						d.set(4, cnt4);
						cnt2=0;
						cnt3=0;
						cnt4=0;
						mchultotal=0;				
						
						model.addRow(d);
						table.getTableHeader().setReorderingAllowed(false);
						test = "";
						
						rs3.close();
						pstmt3.close();
						
						rs2.close();
						pstmt2.close();
						
						rs.close();
						pstmt.close();

						finds.setText("");
					} else {
						JOptionPane.showMessageDialog(null,
								"입력하신 사원Code는 존재하지 않습니다.");
					}
					
					testpstmt.close();
					testrs.close();	
				} else {
					JOptionPane.showMessageDialog(null, "검색할 날짜나 사원Code를 확인해주세요.");
				}
			}else{	
				// 부서에 사원코드가 있는지 없는 지 확인.
				String testsql = "select c.memberid from chuldata c inner join memberdata m "
						+ "on c.memberid=m.memberid where m.team=? and to_char(c.chuldate, 'yyyy-MM')=?";
				PreparedStatement testpstmt = pm.conn.prepareStatement(testsql);
				testpstmt.setString(1, comboteam);
				testpstmt.setString(2, comboYear + "-" + comboMon);
				ResultSet testrs = testpstmt.executeQuery();
				while (testrs.next()) {
					test = testrs.getString(1);
				}
				if(!test.equals("")){
					
					model.setNumRows(0);
					
					// 월별 날짜 컬럼을 만들기
					String sql = "select to_char(last_day(?), 'DD') from dual";
					PreparedStatement pstmt = pm.conn.prepareStatement(sql);
					pstmt.setString(1, comboYear + "-" + comboMon + "-" + "1");
					ResultSet rs = pstmt.executeQuery();
					
					// 컬럼명 테이블에 세팅
					while (rs.next()) {
						mchultotal = rs.getInt(1);
					}
					
					col = new Vector<>();
					col.add("사번");
					col.add("이름");
					col.add("");
					col.add("");
					col.add("");
					
					for (int j = 1; j <= mchultotal+3; j++) {
						if(j==(mchultotal+1)){
							col.set(2, "출근");
						}
						else if(j==(mchultotal+2)){
							col.set(3, "결근");
						}
						else if(j==(mchultotal+3)){
							col.set(4, "휴가");
						}
						else{
							col.add(j + "일");
						}
					}
					model = new DefaultTableModel(col, 0){
						public boolean isCellEditable(int rowIndex, int mColIndex) {
							return false;
						}
					};
					table.setModel(model);
					
					DefaultTableCellRenderer dtcr = new DefaultTableCellRenderer(); // 디폴트테이블셀렌더러를 생성
					dtcr.setHorizontalAlignment(SwingConstants.CENTER); // 렌더러의 가로정렬을 CENTER로
					
					TableColumnModel tcm = table.getColumnModel(); // 정렬할 테이블의 컬럼모델을 가져옴

					for (int j = 0; j <= mchultotal+4; j++) {
						column = table.getColumnModel().getColumn(j);
						column.setResizable(false);
						tcm.getColumn(j).setCellRenderer(dtcr);
						if (j == 0) {
							column.setPreferredWidth(45);
						}else if(j == 1){
							column.setPreferredWidth(50);
						}else {
							column.setPreferredWidth(34);
						}
					}
					
					// 부서에 맞는 출퇴근 현황을 불러옴.
					String sql2 = "select c.memberid, m.irum, c.chultype, c.chuldate "
							+ "from chuldata c inner join memberdata m "
							+ "on c.memberid=m.memberid where m.team=? and "
							+ "to_char(chuldate, 'yyyy-MM')=? order by c.memberid, c.chuldate";
					PreparedStatement pstmt2 = pm.conn.prepareStatement(sql2);
					pstmt2.setString(1, comboteam);
					pstmt2.setString(2, comboYear + "-" + comboMon);
					ResultSet rs2 = pstmt2.executeQuery();
					
					while (rs2.next()) {
						if(cnt>mchultotal){
							flag = true;
							alldata.set(2, cnt2);
							alldata.set(3, cnt3);
							alldata.set(4, cnt4);
							model.addRow(alldata);

							alldata = new Vector<>();
							cnt=1;
							cnt2=0;
							cnt3=0;
							cnt4=0;
						}
						if(flag){
							alldata.add(rs2.getString(1));
							alldata.add(rs2.getString(2));
							alldata.add("");
							alldata.add("");
							alldata.add("");
							
							flag = false;							
						}
						if (rs2.getInt(3) == 1) {
							alldata.add("O");
							cnt2++;
						} else if (rs2.getInt(3) == 0) {
							alldata.add("X");
							cnt3++;
						} else{
							cnt4++;
						}

						cnt++;
					}if(rs.next()==false){
						flag = true;
						alldata.set(2, cnt2);
						alldata.set(3, cnt3);
						alldata.set(4, cnt4);
						model.addRow(alldata);

						alldata = new Vector<>();
						cnt=1;
						cnt2=0;
						cnt3=0;
						cnt4=0;
					}
					table.getTableHeader().setReorderingAllowed(false);
					rs2.close();
					pstmt2.close();
					
					rs.close();
					pstmt.close();
					
					testrs.close();
					testpstmt.close();
					
					test="";
					mchultotal=0;
				}else {
					JOptionPane.showMessageDialog(null, "선택하신 월 부서 현황은 존재하지 않습니다.");
				}
					
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
		finds.requestFocus();
	}
	
	public void allcal(){
		try {
			model.setNumRows(0);
			// 월별 날짜 컬럼을 만들기 위해서 마지막날 뽑기
			
			String sql = "select to_char(last_day(?), 'DD') from dual";
			PreparedStatement pstmt = pm.conn.prepareStatement(sql);
			pstmt.setString(1, comboYear + "-" + comboMon + "-" + "1");
			ResultSet rs = pstmt.executeQuery();

			// 컬럼명 테이블에 세팅
			while (rs.next()) {
				mtotal = rs.getInt(1);
			}
			col = new Vector<>();
			col.add("사번");
			col.add("이름");
			col.add("");
			col.add("");
			col.add("");
			
			for (int j = 1; j <= mtotal+3; j++) {
				if(j==(mtotal+1)){
					col.set(2, "출근");
				}
				else if(j==(mtotal+2)){
					col.set(3, "결근");
				}
				else if(j==(mtotal+3)){
					col.set(4, "휴가");
				}
				else{
					col.add(j + "일");
				}
			}
			model = new DefaultTableModel(col, 0);
			table.setModel(model);
			
			DefaultTableCellRenderer dtcr = new DefaultTableCellRenderer(); // 디폴트테이블셀렌더러를 생성
			dtcr.setHorizontalAlignment(SwingConstants.CENTER); // 렌더러의 가로정렬을 CENTER로
			
			TableColumnModel tcm = table.getColumnModel(); // 정렬할 테이블의 컬럼모델을 가져옴

			for (int j = 0; j <= mtotal+4; j++) {
				column = table.getColumnModel().getColumn(j);
				column.setResizable(false);
				tcm.getColumn(j).setCellRenderer(dtcr);
				if (j == 0) {
					column.setPreferredWidth(45);
				}else if(j == 1){
					column.setPreferredWidth(50);
				}else {
					column.setPreferredWidth(34);
				}
			}
			
			// 전 사원 월별 출퇴근 현황 테이블에 출력
			String sql2 = "select c.memberid, m.irum, c.chultype "
					+ "from chuldata c inner join memberdata m "
					+ "on m.memberid=c.memberid "
					+ "where to_char(c.chuldate, 'yyyy-MM')=? order by m.irum, c.chuldate";

			PreparedStatement pstmt2 = conn.prepareStatement(sql2);
			pstmt2.setString(1, comboYear + "-" + comboMon);
			ResultSet rs2 = pstmt2.executeQuery();
			
			alldata = new Vector<>();
			
			
			while (rs2.next()) {
				if(cnt>mtotal){
					int imsi=0;
					tflag = true;

					String sql3 = "select distinct h.holytype, to_char(holydate, 'DD') "
							+ "from holydata h, chuldata c where h.memberid = c.memberid "
							+ "and c.memberid = '" + alldata.get(0) + "' and chultype = 1 "
									+ "and to_char(holydate, 'MM') = '" + comboMon + "'";
					PreparedStatement pstmt3 = pm.conn.prepareStatement(sql3);
					ResultSet rs3 = pstmt3.executeQuery();
					ResultSetMetaData rsm3 = rs3.getMetaData();
					while(rs3.next()){
						for(int k = 1; k < rsm3.getColumnCount(); k ++){ // 휴가가 있을 경우 휴가를 출력
							imsi = Integer.parseInt(rs3.getString(2)) + 4;
							if(rs3.getString(1).equals("0")){
								alldata.set(imsi, "내규");
							}
							else if(rs3.getString(1).equals("1")){
								alldata.set(imsi, "월차");
							}
							else if(rs3.getString(1).equals("2")){
								alldata.set(imsi, "연차");
							}
							else if(rs3.getString(1).equals("3")){
								alldata.set(imsi, "생리");
							}
							else{
								alldata.set(imsi, "기타");
							}
							cnt4++;
						}
					}
					rs3.close();
					pstmt3.close();
					
					alldata.set(2, cnt2-cnt4);
					alldata.set(3, cnt3);
					alldata.set(4, cnt4);
					model.addRow(alldata);

					alldata = new Vector<>();
					cnt=1;
					cnt2=0;
					cnt3=0;
					cnt4=0;
				}
				if(tflag){
					alldata.add(rs2.getString(1));
					alldata.add(rs2.getString(2));
					alldata.add("");
					alldata.add("");
					alldata.add("");
					
					tflag = false;							
				}
				if (rs2.getInt(3) == 1) {
					alldata.add("O");
					cnt2++;
				} else if (rs2.getInt(3) == 0) {
					alldata.add("X");
					cnt3++;
				}

				cnt++;
			}if(rs.next()==false){
				tflag = true;
				alldata.set(2, cnt2);
				alldata.set(3, cnt3);
				alldata.set(4, cnt4);
				model.addRow(alldata);

				alldata = new Vector<>();
				cnt=1;
				cnt2=0;
				cnt3=0;
				cnt4=0;
			}
			
			table.getTableHeader().setReorderingAllowed(false);
			rs2.close();
			pstmt2.close();
			
			rs.close();
			pstmt.close();
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

	private JLayeredPane getLayeredPane_1() {
		if (layeredPane == null) {
			layeredPane = new JLayeredPane();
			layeredPane.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "\uC120\uD0DD\uB144\uC6D4 \uC120\uD0DD", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));
			layeredPane.setBounds(12, 10, 166, 57);
			layeredPane.add(getComboBox());
			layeredPane.add(getComboBox_1_1());
		}
		return layeredPane;
	}
	private JLayeredPane getLayeredPane_1_1() {
		if (layeredPane_1 == null) {
			layeredPane_1 = new JLayeredPane();
			layeredPane_1.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "\uBD80\uC11C \uC120\uD0DD", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));
			layeredPane_1.setBounds(190, 10, 134, 57);
			layeredPane_1.add(getComboBox_3());
			layeredPane_1.add(getCheckBox());
		}
		return layeredPane_1;
	}
	private JComboBox getComboBox_3() {
		if (comboBox_3 == null) {
			comboBox_3 = new JComboBox(comteam);
			comboBox_3.addItemListener(new ItemListener() {
				public void itemStateChanged(ItemEvent e) {
					comboteam = String.valueOf(e.getItem());
				}
			});
			try {
				String ct = "select distinct team from memberdata";
				PreparedStatement ps = pm.conn.prepareStatement(ct);
				ResultSet rsteam = ps.executeQuery();
				while (rsteam.next()) {
					comteam.add(rsteam.getString(1));
					m++;
				}
				m = 1;
				ps.close();
				rsteam.close();
			} catch (Exception ex) {
				ex.printStackTrace();
			}
			comboBox_3.setEnabled(false);
			comboBox_3.setBounds(12, 26, 105, 21);
		}
		return comboBox_3;
	}
	private JCheckBox getCheckBox() {
		if (CheckBox == null) {
			CheckBox = new JCheckBox("");
			CheckBox.addItemListener(new ItemListener() {

				public void itemStateChanged(ItemEvent e) {
					if(CheckBox.isSelected()==false){
						comboBox_3.setEnabled(false);
						finds.setEnabled(true);
						btnAll.setEnabled(true);
					}else{
						finds.setEnabled(false);
						comboBox_3.setEnabled(true);
						btnAll.setEnabled(false);
					}
				}
			});
			CheckBox.setBounds(69, -3, 21, 23);
		}
		return CheckBox;
	}
	private JButton getBtnAll() {
		if (btnAll == null) {
			btnAll = new JButton("All");
			btnAll.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent arg0) {
					allcal();
				}
			});
			btnAll.setBounds(613, 39, 81, 21);
		}
		return btnAll;
	}
}
